<?php
    require_once dirname(__FILE__) . '/../../utils/Utils.php';
    //引入公共参数
    $constant = include(dirname(__FILE__) . '/../../AppletConstant.php');

	$utils =	new Utils();
	/**
	 * 申请签约
	 *
	 */

	//调用接口地址
	$url = "https://open.95516.com/open/access/1.0/contract.apply";
	
	//拼装参数Map
	$params 	=	array();
    $params["appId"] 			=	$constant['appId'];
    $params["accessToken"] 		=	$constant['accessToken'];
    $params["openId"] 			=	$constant['openId'];
    $params["backendToken"] 	=	$constant['backendToken'];

    //协议模板 id ，由云闪付录入模板并分配给接入方
	$params["planId"] 			=	"";

	//接入方侧的签约协议号，由接入方自行生成
	$params["contractCode"] 	=	"";
	//发送请求
	$resultStr 	=	$utils->sendPostGson($url,$params);
	header("Content-type: text/html; charset=utf-8");
	print_r("-------申请签约: ".$resultStr." --------- ");
	exit();
?>